package com.example.houqin_oa.controller;

import com.example.comment_oa.pojos.DrawGoods;
import com.example.comment_oa.response.AjaxResponse;
import com.example.houqin_oa.service.DrawGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description:物品领取页面的Controller
 * @Author:陈旭良
 * @Documents_And_Settings:liang
 * @Date:2022/10/24 18:28
 * @Entry_Name:my_springcloud_project01cangku
 */
@RestController
@CrossOrigin
@RequestMapping("/houqinOa")
public class DrawController {
    @Autowired
    DrawGoodsService drawGoodsService;

    @PostMapping("/Draw/DrawAll")
    public AjaxResponse DrawAll(@RequestBody DrawGoods drawGoods){
        return AjaxResponse.success(drawGoodsService.DrawAll(drawGoods));
    }
    @PostMapping("/Draw/Open")
    public AjaxResponse Open(@RequestBody DrawGoods drawGoods){
        return AjaxResponse.success(drawGoodsService.Open(drawGoods));
    }
    @PostMapping("/Draw/AddModify")
    public AjaxResponse AddModify (@RequestBody DrawGoods drawGoods){
        return AjaxResponse.success(drawGoodsService.AddModify(drawGoods));
    }

    @PostMapping("/Draw/Note")
    public AjaxResponse Note(@RequestBody DrawGoods drawGoods){
        return AjaxResponse.success(drawGoodsService.Note(drawGoods));
    }
}
